<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../../vue.js"></script>
    <title>Document</title>
</head>

<body>
    <div class="app">
        <h2 >你好{{wld.world}}</h2>
        <button @click="btn">点击出现你好</button>
    </div>
</body>
<script>
    const vm = new Vue({
        data() {
            return {
                wld:{

                }
            }
        },
        methods: {
            btn(){
                // 使用set添加属性-属性值
                // Vue.set(this.wld,'world','世界')
                this.$set(this.wld,'world','世界')
            }
        },
    }).$mount('.app')
</script>

</html>